comparison cagou/plugins/plugin_wid_file_sharing.py @ 212:38b43ed18bb5

file sharing: use "your server" name when sharing component domain ends with our domain
author Goffi <goffi@goffi.org>
date Fri, 25 May 2018 14:59:52 +0200
parents b25d03403898
children 423d462ea739
comparison
equal deleted inserted replaced
211:b25d03403898 212:38b43ed18bb5
216 self.own_device = entity_jid.bare == own_jid 216 self.own_device = entity_jid.bare == own_jid
217 if self.own_device: 217 if self.own_device:
218 name = self.identities.name 218 name = self.identities.name
219 elif self.entity_jid.node: 219 elif self.entity_jid.node:
220 name = self.entity_jid.node 220 name = self.entity_jid.node
221 elif self.entity_jid.domain == own_jid.domain: 221 elif self.entity_jid.domain.endswith(own_jid.domain):
222 name = _(u"your server") 222 name = _(u"your server")
223 else: 223 else:
224 name = _(u"sharing component") 224 name = _(u"sharing component")
225 225
226 super(DeviceWidget, self).__init__(sharing_wid, name) 226 super(DeviceWidget, self).__init__(sharing_wid, name)